package dayOfyear;

import java.time.LocalDate;
import java.util.Scanner;

public class Test2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int year = sc.nextInt();
        int month = sc.nextInt();
        int day = sc.nextInt();

        LocalDate date = LocalDate.of(year, month, day);
        int dayOfYear = date.getDayOfYear();
        System.out.println(dayOfYear);
    }
}
